﻿using DXBase.D3D;
using DXBase.Structs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Shapes;

namespace Sample2_HitTesting
{
	public class HitItem : IHasBounds<Box3D>
	{
		public HitItem()
		{
		}
		public string Name { get; set; }
		public Box3D BaseBox { get; set; }

		public CenteredRotationTransform ModelTransform { get; set; }
		public ModelTransform3D ObjectTransform { get; set; }

		public Matrix4x4F Transform { get; set; }
		public Matrix4x4F NormalTransform { get; set; }
		public Box3D Bounds { get; set; }

		public void UpdateAndTransformAndBounds()
		{
			Transform = ModelTransform.Transform * ObjectTransform.Transform;
			NormalTransform = ModelTransform.Transform * ObjectTransform.NormalTransform;
			Bounds = BaseBox.Convert(Transform);
		}
	}
}
